package com.demo.spring_demo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserAndUserInfo {
    private String nickname;
    private String username;
    private String password;
    private String phone;
    private String email;
    private String info;
    private String city;
    private String avatar;
    private String birthday;
    private String registerDate;

    public UserAndUserInfo(String username,String nickname, String password, String phone, String email) {
        this.nickname = nickname;
        this.username = username;
        this.password = password;
        this.phone = phone;
        this.email = email;
        this.registerDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
    }
}
